<template>
  <li>
    {{ data.name }}
    <ul v-if="data.children">
      <tree-item v-for="child in data.children" :data="child"></tree-item>
    </ul>
  </li>
</template>

<script>
export default {
  name: "tree-item",

  props: {
    data: {
      type: Object,
      required: true,
    },
  },
};
</script>
